// import store from '../store/index.js'
let globalConfig = "";
const accountInfo = wx.getAccountInfoSync();
const log = require("@/utils/log.js");

const envObj = {
    release: "prod", // 正式
    develop: "test", // 开发
    trial: "release" // 体验
};

log.info(`反馈信息:获取当前帐号信息版本号, 信息为:${JSON.stringify(accountInfo.miniProgram)}`);

if (process.env.NODE_ENV === "development") {
    // 开发环境
    globalConfig = {
        //baseUrl: `https://ddsssy.com/prod-api/`,
        //imageUrl: `https://ddsssy.com/prod-api/`,
        baseUrl: `https://ddsssy.com/prod-api/`,
        imageUrl: `https://ddsssy.com/prod-api/`,
        activityImageUrl: ``,
        esignUrl: ``,
        ana_url: ``,
        uploadUrl: ``,
        siteId: 4,
        env: envObj[accountInfo.miniProgram.envVersion]
    };
} else {
    // 生产环境
    globalConfig = {
        baseUrl: "https://ddsssy.com/prod-api/",
        ssoUrl: "",
        microUrl: "",
        imageUrl: `https://ddsssy.com/prod-api/`,
        siteId: 4,
        env: envObj[accountInfo.miniProgram.envVersion]
    };
}

export default globalConfig;
